package cn.yotta.user.api.params.user;

import cn.yotta.common.api.model.CheckValid;
import cn.yotta.common.utils.param.AssertUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import static cn.yotta.user.api.error.LoginErrorCode.TOKEN_MUST_NOT_NULL;

/**
 * @author wyaoyao
 * @date 2023/3/10 21:11
 */
@Data
@ApiModel("根据Token查询登录用户请求参数")
public class UserFindByTokenRequest implements CheckValid {

    @ApiModelProperty("登录用户token")
    private String token;

    @Override
    public void checkValid() {
        AssertUtil.notBlank(token, TOKEN_MUST_NOT_NULL.getCode());
    }
}
